<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>六西格玛知识管理</title>
<link href="<?php echo $this->baseUrl ?>/public/style/style.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/daterangepicker.css" rel="stylesheet" type="text/css" />
<link href="<?php echo $this->baseUrl ?>/public/style/jquery-ui.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/daterangepicker.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/scripts/jquery-ui.js"></script>
<script type="text/javascript" src="<?php echo $this->baseUrl ?>/public/fckeditor/fckeditor.js"></script>
</head>

<body>
<!--头部-->
<?php echo $this->partial('common/header.html', array('template'=>$this->template, 'baseUrl'=>$this->baseUrl)) ?>

<!--主体-->
<div class="main-box" id="mainBox">
	<div class="third-menu">
        <?php echo $this->partial('common/operation.html', array('template'=>$this->template,'uid'=>$this->project[0]['user_id'], 'baseUrl'=>$this->baseUrl, 'id'=>$_GET['project_id'])) ?>
        <div class="menu-title"><span class="icon"></span>项目详细页</div>
  	</div>
    <div class="separate-line"></div>
    
    <div class="main-form">
        <div class="project-show">
            <h2 class="project-title"><?php echo $this->project[0]['title']; ?></h2>
            <div class="project-info">
                <span>
                	指导教师：
                    <?php if($this->teacher_name): ?>
                    <a href="<?php echo $this->baseUrl ?>/teacher/detail?teacher_id=<?php echo $this->project[0]['teacher_id']; ?>" target="_blank"><?php echo $this->teacher_name; ?></a>
                    <?php else: ?>
                    未填写
                    <?php endif; ?>
                </span>
                <span>
                	责任人：
                    <?php if($this->student_name): ?>
                    <a href="<?php echo $this->baseUrl ?>/student/detail?student_id=<?php echo $this->project[0]['student_id']; ?>" target="_blank"><?php echo $this->student_name; ?></a>
                    <?php else: ?>
                    未填写
                    <?php endif; ?>
                </span>
                <span>项目时间：<?php echo !empty($this->project[0]['start_time'])?date("Y年", $this->project[0]['start_time']):'未填写'; ?></span>
            </div>
            <div class="project-info">
            	<span> 
                	项目类型：
                    <?php foreach ($this->conf->projectType as $key => $val): ?>
                        <?php if($this->project[0]['category']==$key): ?><?php echo $val; ?><?php endif; ?>
                    <?php endforeach; ?>
                </span>
                <span> 
                	项目分类：
                    <?php foreach ($this->conf->projectKind as $key => $val): ?>
                        <?php if($this->project[0]['kind']==$key): ?><?php echo $val; ?><?php endif; ?>
                    <?php endforeach; ?>
                </span>
                <span> 
                	项目收益：
                    <?php echo $this->project[0]['income']?$this->project[0]['income']:'未填写'; ?>
                </span>
                <?php if($this->project[0]['pid']>0): ?>
                <!--span>
                	上级黑带项目名称：
                    <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['pid']; ?>" target="_blank"><?php echo $this->p_project_name; ?></a>
                </span-->
                <?php endif; ?>
            </div>
            <div class="project-desc">
            	<div class="project-border">
            	项目摘要：<?php echo !empty($this->project[0]['summary'])?$this->project[0]['summary']:'暂无信息'; ?>
                </div>
            </div>
        </div>
        
        <?php if ( $this->project[0]['key_word']): ?>
        <div class="project-show">
        	<div class="project-desc">
            	<div class="project-border">
                <dl class="class-info">
                	<dd>
                    <b>关键词：</b>
                		<span><?php echo $this->project[0]['key_word']; ?></span>
                    </dd>
                </dl>
                </div>
            </div>
        </div>
        <?php endif; ?>
        
        <?php if ($this->tag_current): ?>
        <div class="project-show">
        	<div class="project-desc">
            	<div class="project-border">
                <dl class="class-info">
                	<dd>
                    <b>相关标签：</b>
                	<?php foreach ($this->tag_current as $key => $val): ?>
                    	<span>
                        <a href="<?php echo $this->baseUrl ?>/tag/detail?tag_id=<?php echo $val['tag_id']; ?>" target="_blank"><?php echo $val['name']; ?></a>
                        </span>
                    <?php endforeach; ?>
                    <a href="<?php echo $this->baseUrl ?>/project/tag?project_id=<?php echo $_GET['project_id']; ?>" class="btn_01" target="_blank" style="float:right">编辑</a>
                    </dd>
                </dl>
                </div>
            </div>
        </div>
        <?php endif; ?>
        
        <?php if($this->projectfiles): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760px">
                    <tr><th colspan="3" style="font-size:14px; color:#C00">项目附件</th></tr>
                    <tr align="center"><th>文档名称</th><th width="30%">注释</th><th width="25%">上传时间</th></tr>
                    <?php foreach ($this->projectfiles as $key => $val): ?>
                        <tr align="center">
                        	<td><a href="<?php echo $this->baseUrl; ?>/<?php echo $val['path']; ?>" target="_blank"><?php echo $val['file_name']; ?></a></td>
                            <td><?php echo $val['summary']; ?></td>
                            <td><?php echo date('Y-m-d',$val['create_time']); ?></td>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
            </div>
            </div>
        </div>
        <?php endif; ?>
        
    <?php if($this->project_cases): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760px">
                    <tr><th colspan="3" style="font-size:14px; color:#C00">项目参考案例</th></tr>
                    <tr align="center"><th>案例名称</th><th width="30%">注释</th><th width="25%">上传时间</th></tr>
                    <?php foreach ($this->project_cases as $key => $val): ?>
                        <tr align="center">
                        	<td><a href="<?php echo $this->baseUrl; ?>/project/detail?project_id=<?php echo $val['project_id']?>" target="_blank"><?php echo $val['title']; ?></a></td>
                            <td><?php echo $val['summary']; ?></td>
                            <td><?php echo date('Y-m-d',$val['create_time']); ?></td>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
                <div class="page-bar2">
                <div>总数：<span class="total-count"><?php echo $this->ps_total ?></span></div>
                <div>
                <?php if ($this->ps_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&ps_page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->ps_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&ps_page=<?php echo $this->ps_page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->ps_page < $this->ps_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&ps_page=<?php echo $this->ps_page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->ps_page < $this->ps_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&ps_page=<?php echo $this->ps_pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->ps_page ?>/<?php echo $this->ps_pages ?></span></div>
          	</div>
            </div>
            </div>
        </div>
        <?php endif; ?>
        
        <?php if($this->projectrelated): ?>
        <div class="project-show">
        	<div class="project-desc">
            <div class="project-border">
                <dl class="class-info">
                    <dd>
                    <table width="760px">
                    <tr><th colspan="3" style="font-size:14px; color:#C00">相关项目</th></tr>
                    <tr align="center"><th>项目标题</th><th width="30%">关键字</th><th width="25%">项目时间</th></tr>
                    <?php foreach ($this->projectrelated as $key => $val): ?>
                        <tr align="center">
                        	<td><a href="<?php echo $this->baseUrl; ?>/project/detail?project_id=<?php echo $val['project_id']; ?>" target="_blank"><?php echo $val['title']; ?></a></td>
                            <td><?php echo $val['key_word']; ?></td>
                            <td><?php echo $val['start_time']>0?date('Y-m-d',$val['start_time']):'未填写'; ?></td>
                        </tr>
                    <?php endforeach; ?>
                    </table>
                    </dd>
                </dl>
                <div class="page-bar2">
                <div>总数：<span class="total-count"><?php echo $this->pro_total ?></span></div>
                <div>
                <?php if ($this->pro_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&pro_page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->pro_page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&pro_page=<?php echo $this->pro_page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->pro_page < $this->pro_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&pro_page=<?php echo $this->pro_page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->pro_page < $this->pro_pages): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&pro_page=<?php echo $this->pro_pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->pro_page ?>/<?php echo $this->pro_pages ?></span></div>
          	</div>
            </div>
            </div>
        </div>
        <?php endif; ?>
        
        <div class="mod-comment">
            <div class="head">评论</div>
            <p class="line"></p>
            <?php if($this->comments): ?>
          	<ul class="comment-list">
            	<?php foreach ($this->comments as $key => $val): ?>
                <li>
                    <span class="user"><?php echo $val['teacher_name'];?>：</span>
                    <span class="score">评分：<font color="#CC0000"><?php echo $val['level']; ?></font></span>
                    <span class="recommend">推荐：
                    <?php 
                    	if($val['recommend']==0){
                        	echo '未选择';
                        }elseif($val['recommend']==1){
                        	echo "<font color='green'>推荐</font>";
                        }elseif($val['recommend']==2){
                        	echo "<font color='red'>不推荐</font>";
                        }
                    ?>
                    </span>
                    <span class="time">评论时间：<i><?php echo date('Y-m-d H:i:s',$val['create_time']); ?></i></span>
                    <div class="content">
                    <?php echo $val['content']; ?>
                    </div>
                </li>
                <?php endforeach; ?>
            </ul>
          	<div class="page-bar">
                <div>总数：<span class="total-count"><?php echo $this->total ?></span></div>
                <div>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&page=1">首页</a>
                <?php else: ?>
                首页
                <?php endif; ?>
                <?php if ($this->page > 1): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&page=<?php echo $this->page-1 ?>">上一页</a>
                <?php else: ?>
                上一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&page=<?php echo $this->page+1 ?>">下一页</a>
                <?php else: ?>
                下一页
                <?php endif; ?>
                <?php if ($this->page < $this->pages): ?>
                <a href="<?php echo $this->baseUrl ?>/project/detail?project_id=<?php echo $this->project[0]['project_id']; ?>&page=<?php echo $this->pages ?>">尾页</a>
                <?php else: ?>
                尾页
                <?php endif; ?>
                </div>
                <div>页数：<span class="page-detail"><?php echo $this->page ?>/<?php echo $this->pages ?></span></div>
          	</div>
            <?php endif; ?>
          
          	<div class="comment-form">
                <form method="post" name="form_commend" action="<?php echo $this->baseUrl?>/comment/add">
                <div class="desc">
                    <input type="hidden" name="cid" value="<?php echo $this->project[0]['project_id'];?>" />
                    <input type="hidden" name="category" value="1" />
                    <input type="hidden" name="template" value="<?php echo $this->template?>" />
                    <span class="float-right">
                        <label for="recommend">推荐：</label>
                        <select name="recommend" class="input-text">
                            <option>请选择...</option>
                            <option value="1">推荐</option>
                            <option value="2">不推荐</option>
                        </select>
                    </span>
                    <label for="score">评分：</label>
                    <select name="score" class="input-text">
                    	<?php foreach ($this->conf->score as $key => $val): ?>
                        <option value="<?php echo $val; ?>"><?php echo $val; ?></option>
                        <?php endforeach; ?>
                    </select>
                </div>
                <p class="content">
                    <label for="content">评论内容：</label>
                    <textarea name="content" class="input-textarea"></textarea>
                </p>
                <p><input type="submit" class="button" value="确认提交" style="margin-left:0" /></p>
            	</form>
          	</div>
        </div>
	</div>
</div>








<!--底部-->
<?php echo $this->partial('common/footer.html') ?>
</body>
</html>
